package com.ruoyi.ppt.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.ppt.domain.PptContent;
import com.ruoyi.ppt.mapper.PptContentMapper;
import com.ruoyi.ppt.service.PptContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 李志鑫
 * @since 2024-07-04
 */
@Service
public class PptContentServiceImpl extends ServiceImpl<PptContentMapper, PptContent> implements PptContentService {
    @Autowired
    private PptContentMapper pptContentMapper;

    @Override
    public AjaxResult listId(Integer id) {
        QueryWrapper<PptContent> pptContentQueryWrapper = new QueryWrapper<>();
        pptContentQueryWrapper.eq("template_id",id);
        List<PptContent> pptContents = pptContentMapper.selectList(pptContentQueryWrapper);
        return new AjaxResult(HttpStatus.SUCCESS,"查询成功",pptContents);
    }
}
